package de.yvert.jingle.impl.openexr;

import java.io.IOException;

import de.yvert.jingle.help.ConverterOutputStream;

public class ExrOutputStream
{

private final ConverterOutputStream out;

public ExrOutputStream(ConverterOutputStream out)
{
	this.out = out;
}

public void writeByte(byte b) throws IOException
{ out.writeByte(b); }

public void writeInt(int i) throws IOException
{ out.writeInt(i); }

public void writeString(String s) throws IOException
{
	if (s != null)
	{
		byte[] data = s.getBytes();
		for (int i = 0; i < data.length; i++)
			out.writeByte(data[i]);
	}
	out.writeByte(0);
}

public void write(byte[] value) throws IOException
{ out.write(value); }

public void writeFloat(float value) throws IOException
{ out.writeFloat(value); }

public void writeLong(long value) throws IOException
{ out.writeLong(value); }

public void flush() throws IOException
{ out.flush(); }

}
